-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate base/ platform from VS Code and adopt scroll bar #5096
Conversation
@Tyriar Yupp most likely will be able to have a look at it in the afternoon. No clue yet if I manage to go deeper into details, ~20k loc is still a frightening number for a single quick review. I also have no doubt about code quality of the pulled in source, thus will skip most inner parts and mostly stick to a better conceptual comprehension. One thing upfront - what you write about getting code fixes carried over with the help of additional scripts sounds a bit bothersome to me from a maintenance perspective. Do you see a chance, that your team would bundle&release the custom scrollbar functionality as a standalone package in the future? (Well idk if thats feasible or worth the trouble at all, have not yet looked at the code...) |
I will probably be the one doing this and I doubt it will happen very often, like so infrequently that it definitely isn't worth trying to ship some lib. For example we will likely want to move over to the event and lifecycle code since it's more robust than ours and duplicates its functionality, and I think since those files are already present they won't need to bring in any changes. |
This isn't used anymore, it was used earlier to workaround recursion between the viewport and the terminal objects
this.register(coreMouseService.onProtocolChange(type => { | ||
this._scrollableElement.updateOptions({ | ||
handleMouseWheel: !(type & CoreMouseEventType.WHEEL) | ||
}); | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jerch this was easy and works great 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay, C-ish will safe the world someday, but before that, drive all programmers mad 😺
Prelude to the feasibility of GPU rendering in code editor. 😃 |
Here's the output, there's a pretty significant increase for the main xterm.js package but I think we should accept it still because:
All the addons are the same as expected so nothing leaked in there. .js output (webpack) - measured by looking at Windows Explorer (seems to be larger? kB vs KiB?):
.mjs output (esbuild) - measured by esbuild output:
|
Planning on merging this soon today. I want to look briefly at the ctrl+c/smooth scroll issue that's been driving me crazy for months. |
Fixed microsoft/vscode#211199 finally! It was very difficult with the old viewport because of the mess of circular dependencies that was the scroll events |
Maybe this will be a good opportunity to do a v6. While no big breaking changes it does:
|
|
@tisilent good to know 👍 |
@Tyriar Yay thx for getting this & the ESM stuff done! 🥳 While the impact on bundle size is quite steep, I couldn't care less, since we get some solid and well tested stuff in return... Edit: Yes, I second the idea to do a new major release at this point. Even though the API did not change substantially, the changes overall are still quite a lot, and well - ESM alone would qualify for that from an outer perspective. |
Last one I swear 🤞
This PR includes the
base/
platform directory from VS Code and replaces our oldViewport
withDomScrollableElement
. This makes the scroll bar much nicer, not only in term of UX but also to the developer as it's much more reliable and flexible. The new projectvs/
includes a subset ofbase/
that includes only files that are referenced and then has some files changed that weren't getting tree shaken correctly (eg. the grapheme related stuff).Included are 2 important scripts that will help us update
base/
when needed in the future to pull in bug fixes and/or new features:bin/vs_base_update.ps1
will clone the repo, copy files over and do some clean upbin/vs_base_find_unused.js
uses the typescript compiler API to find any unused files for deletion before doing a commit@jerch finishing up for the day but it would be great if you could give this a review now, in particular trying out the new scroll bar and look at how
src/vs/
is integrated (don't bother reviewingsrc/vs/base/
as it's already had a lot of eyes on it). I think the only thing left to do on my end is to clean up the newViewport
usage and fix the TODOs. Planning on merging tomorrow if all goes well.TODO: